package com.pmh.hrs.sys.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

import com.pmh.hrs.sys.dao.SysRoleScreenDAO;
import com.pmh.hrs.sys.service.SysRoleScreenService;
import com.pmh.hrs.sys.vo.SysRoleScreenVO;

@Service("sysRoleScreenService")
public class SysRoleScreenServiceImpl implements SysRoleScreenService{

	@Resource(name="sysRoleScreenDAO")
	private SysRoleScreenDAO sysRoleScreenDAO;
	
	
	private SysRoleScreenVO convertSysRoleScreenVO(Map<String,Object> paramMap) throws Exception{
		SysRoleScreenVO sysRoleScreenVO = new SysRoleScreenVO();
		BeanUtils.copyProperties(paramMap, sysRoleScreenVO);
		return sysRoleScreenVO;
	}
	
	@Override
	public int insert(Map<String,Object> paramMap) throws Exception {
		SysRoleScreenVO sysRoleScreenVO =  this.convertSysRoleScreenVO(paramMap);
		return sysRoleScreenDAO.insert(sysRoleScreenVO);
	}

	@Override
	public int update(Map<String,Object> paramMap) throws Exception {
		SysRoleScreenVO sysRoleScreenVO =  this.convertSysRoleScreenVO(paramMap);
		return sysRoleScreenDAO.update(sysRoleScreenVO);
	}

	@Override
	public int delete(Map<String,Object> paramMap) throws Exception {
		return sysRoleScreenDAO.delete(paramMap);
	}

	@Override
	public List<Map<String, Object>> selectList(Map<String,Object> paramMap) throws Exception {
		return sysRoleScreenDAO.selectList(paramMap);
	}

}
